import { datas } from './fields.js'
let that
// 串口监听
export default {
	data() {
		return {
			show: false,
			time: '',
			params: {
				year: true,
				month: true,
				day: true,
				hour: true,
				minute: true,
				second: false,
			},
			timeName: '',
			startTime: '',
			endTime: '',
			contents: ''
		}
	},
	computed: {},
	onShow() {},
	created() {
		that = this
	},
	onReady() {},
	onLoad(options) {
		that = this
		console.log(options)
	},
	methods: {
		confirmTime(e) {
			console.log(e)
			if(that.timeName == 'start') {
				that.startTime = e.year +'-'+ e.month +'-'+ e.day +' '+ e.hour +':'+ e.minute
			}
			if(that.timeName == 'end') {
				that.endTime = e.year +'-'+ e.month +'-'+ e.day +' '+ e.hour +':'+ e.minute
			}
		},
		showPicker(e) {
			that.timeName = e
			that.show = true
		},
		subInfo() {
			that.$common.navigateTo('/pages/device/resp/index')
		}
	}
}